<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('placementTest')} > ${i18n.getMessage('info')}">
	<a href="#" onclick="pp('student/printPlacementTest.sgt?id=${placementTest.id}');">Print</a>
	- <a href="#" onclick="cc('student/showListPlacementTest.sgt?studentId=${(placementTest.student.id)!}')">${i18n.getMessage('list')}</a>
	- <a href="#" onclick="cc('student/showInfoStudent.sgt?id=${(placementTest.student.id)!}')">${i18n.getMessage('student')}</a> 
</@showTitle>

<div id="error" style="display:none"></div>

<form action="student/editPlacementTest.sgt" validator="student/validatePlacementTest.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<input type="hidden" name="id" value="${(placementTest.id)!}"/>
	<input type="hidden" name="version" value="${(placementTest.version)!}"/>
	
	<table id="dataTable" cellspacing="5" align="center" cellpadding="0"><tr> 
		<td class="name">${i18n.getMessage('student')}:</td>
		<td>${(placementTest.student.fullName)!}</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('level')}:</td>
		<td>
			<select name="levelId" id="levelId" style="width:205px">
				<option></option>
				<#list programs as program>
					${request.setAttribute("levels", program.levels)}
					<optgroup label="${program.name}">
						<#list levels as level>
							<option value="${level.id}" <#if (level = (placementTest.level)!)>selected</#if>>${level.name}</option>
						</#list>
					</optgroup>
				</#list>
			</select>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('testDate')}:</td>
		<td><input type="text" name="date" value="${(placementTest.date?date)!}" style="width:200px"/><img class="calendarImg" src="images/calendar/calendar.gif" onclick="displayCalendar(document.forms[0].date, '${i18n.getMessage('format.date')}', this)"/></td>
	</tr><tr>
		<td class="name">${i18n.getMessage('testTime')}:</td>
		<td>
			<select name="placementShiftId" style="width:204px">
				<option></option>
				<#list shifts as shift>
					<option value="${(shift.id)!}" <#if shift=(placementTest.placementShift)!>selected</#if>>${(shift.startTime?time)!}-${(shift.endTime?time)!}</option>
				</#list>
			</select>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('score')}:</td>
		<td>
			Written: <input type="text" name="writtenScore" value="${(placementTest.writtenScore)!}" style="text-align:center;width:43px"/>
			Speaking: <input type="text" name="speakingScore" value="${(placementTest.speakingScore)!}" style="text-align:center;width:43px"/>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('receiptNo')}:</td>
		<td>
			<input type="text" readonly="readonly" name="receiptNo" value="${(placementTest.receiptNo)!}" style="width:200px"/>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('registerDate')}:</td>
		<td><input type="text" name="registerDate" value="${(placementTest.registerDate?date)!}" class="w200"/><img class="calendarImg" src="images/calendar/calendar.gif" onclick="displayCalendar(document.forms[0].registerDate, '${i18n.getMessage('format.date')}', this)"/></td>
	</tr><tr>
		<td class="name">${i18n.getMessage('type')}:</td>
		<td><input type="text" readonly="readonly" value="${(placementTest.placementTestType.name)!}" class="w200"/></td>
	</tr><tr>
		<td class="name">${i18n.getMessage('fee')}:</td>
		<td>
			<#setting locale="en"> 
			<input type="text" readonly="readonly" name="fee" value="${(placementTest.fee)!}" class="right w200"/>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('cashier')}:</td>
		<td>
			<select name="cashierId" style="width:204px">
				<option></option>
				<#list cashiers as cashier>
					<option value="${(cashier.id)!}" <#if (placementTest.cashier)! == cashier>selected</#if>>${(cashier.fullName)!}</option>
				</#list>
			</select>
		</td>
	</tr><tr>
		<td class="name">${i18n.getMessage('options')}:</td>
		<td><input type="checkbox" name="active" value="true" <#if (placementTest.active??)!>checked</#if>/> ${i18n.getMessage('active')}</td>
	</tr><tr>
		<td class="name" style="vertical-align:top">${i18n.getMessage('comment')}:</td>
		<td><textarea name="comment" style="width:350px;height:80px;">${(placementTest.comment)!}</textarea></td>
	</tr><tr>
		<td></td>
		<td>
			<input type="submit" value="${i18n.getMessage('edit')}" class="button_style"/> 
			<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/> 
		</td>
	</tr></table>
</form>